import {Button} from "antd-mobile";
import {useEffect, useRef} from "react";


function App() {
    const domRef = useRef<HTMLInputElement>(null)
    const domRef2 = useRef<undefined | number>(undefined)
    useEffect(() => {
        domRef.current?.focus()

        // @ts-ignore
        domRef2.current = setInterval(() => {
            console.log(domRef2.current)
        }, 1000)

        return () => {
            clearInterval(domRef2.current)
        }
    }, [])
    return (
        <>
            <div>
                <input ref={domRef}/>
                <Button color={"success"}>click me</Button>
            </div>
        </>
    )
}

export default App
